/**
 * @author:fangxiaohua
*  @邮箱：abc2710712@qq.com
*  @qq:1295168875
*  node 路由,拦截指定url,选择相应方法处理
*/
//引controller包
var  common=require('./controller/common');
var user = require('./controller/user');
var userM = require('./controller/userM');
var feedback= require('./controller/feedback');
var verify= require('./controller/verify');
var ubacklist= require('./controller/ubacklist');
var wbsetting = require('./controller/wbsetting');
var publicM = require('./controller/publicM');
var count=require("./controller/count");







void(function(exports){
			exports.router=function(app){
				
					//以下是定义需要拦截的url和处理方法
					app.get('/',common.welcome);
					app.get('/login',common.tologin);
					app.get('/index',common.toindex);
					app.get("/profile",common.toprofile);
					app.get("/userM",common.touserM);
					app.get("/feedback",common.tofeedback);
					app.get("/verify",common.toverify);
					app.get("/ubacklist",common.toubacklist);
					app.get("/wbsetting",common.towbsetting);
					app.get("/publicM",common.topublicM);
					app.get("/count",common.tocount);
					app.get("/chatroom",common.tochatroom);
					app .get("/chatroom2",common.tochatroom2);
					//登录
					app.post('/ulogin',user.login);
					//注册
					app.post('/register',user.register);
					//密码找回
					app.post('/findpwd',user.findpwd);
					//登出
					app.get("/loginout",user.loginout);
					
					//获取用户信息
					app.get("/profile/getProfile",user.getProfile);
					
					//更新用户信息
					app.post("/profile/updateProfile",user.updateProfile);
					
					//更新用户密码
					app.post("/profile/updatePassword",user.updatePassword);
					
					//用户管理，用户列表
					app.post("/userM/ulist",userM.userM_ulist);
					
					//用户授权，角色列表
					app.post("/userM/rlist",userM.userM_rlist);
					
					//用户信息修改
					app.post("/userM/uEdit",userM.userM_uEdit);
					
					//用户授权
					app.post("/userM/rUser",userM.userM_rUser);
					
					//意见反馈列表
					app.post("/feedback/list",feedback.list);
					
					//标记意见反馈已读
					app.post("/feedback/read",feedback.read);
					
					//用户吐槽
					app.post("/feedback/add",feedback.add);
					
					//用户举报列表
					app.post("/verify/list",verify.list);
					
					//关闭举报
					app.post("/verify/close",verify.closeVerify);
					
					//解决举报
					app.post("/verify/fix",verify.fixVerify);
					
					//激活举报
					app.post("/verify/active",verify.activeVerify);
					
					//添加举报
					app.post("/verify/add",verify.addVerify);
					
					//用户黑名单列表
					app.post("/ubacklist/list",ubacklist.list);
					
					//取消黑名单
					app.post("/ubacklist/cancel",ubacklist.cancel);
					
					//添加黑名单
					app.post("/ubacklist/add",ubacklist.add);
					
					//添加黑名单用户快速查询
					app.post("/ubacklist/ulist",ubacklist.ulist);
					
					
					
					//公告管理列表
					app.post("/publicM/list",publicM.list);
					
					//公告状态修改
					app.post("/publicM/edit",publicM.edit);
					
					//公告查看
					app.post("/public/view",publicM.view);
					
					//添加公告
					app.post("/public/add",publicM.add);
					
					//首页公告列表
					app.post("/public/plist",publicM.plist);
					
					//网站基本信息获取
					app.post("/wbsetting/view",wbsetting.view);
					
					//网站基本信息修改
					app.post("/wbsetting/edit",wbsetting.edit);
					
					//网站菜单列表
					app.post("/wbsetting/mlist",wbsetting.mlist);
					
					//菜单排序
					app.post("/wbsetting/msort",wbsetting.msort);
					
					//菜单排序
					app.post("/wbsetting/medit",wbsetting.medit);
					
					//菜单状态修改
					app.post("/wbsetting/mstatus",wbsetting.mstatus);
					
					
					
					
					
					
					
					
					
			
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
			};
})( (function(){
    if(typeof exports === 'undefined') {
        window.exports = {};
        return window.exports;
    } else {
        return exports;
    }
})());
